package java51.lesson0529;

import java.util.Scanner;

import org.apache.log4j.Logger;

public class Shopping {
	public static Logger Log = Logger.getLogger(Shopping.class);

	public static void main(String[] args) {

		Log.debug("菜单界面");
		Log.debug("1：登陆");
		Log.debug("2：注册");
		Log.debug("3：联系客服");
		while (true) {
			Scanner sc = new Scanner(System.in);
			Log.debug("请选择进入的菜单");
			try {

				int choice = sc.nextInt();
				switch (choice) {
				case 1:
					Log.debug("登录界面");
					return;
				case 2:
					Log.debug("注册用户");
					return;
				case 3:
					Log.debug("联系客服解决问题");
					return;
				default:
					Log.warn("选项不存在，重新输入");
				}
			} catch (Exception e) {
				Log.error("输入错误，重新输入");
				// e.printStackTrace();
			}

		}
	}
}
